Skip to content

[SSF 162] - Admin Donation Stats#134

Open
dburkhart07 wants to merge 19 commits intomainfrom
ddb/SSF-162-admin-stats-frontend
Open

[SSF 162] - Admin Donation Stats#134
dburkhart07 wants to merge 19 commits intomainfrom
ddb/SSF-162-admin-stats-frontend

Conversation

@dburkhart07
Copy link
Copy Markdown

@dburkhart07 dburkhart07 commented Mar 21, 2026

ℹ️ Issue

Closes #162

📝 Description

Made necessary backend adjustments to support frontend design:

  • All pantry stats aggregation only works with approved pantries. Pending ones in theory should have no donation data related to them, but they should not be showing up in the stats anywhere
  • Getting the names, and years of orders created for all the approved pantries. This is necessary for the filters, and we needed separate API calls for them since the pantryStats we are getting is constantly changing based on the filters, so we can't rely on that is our source of truth
  • Adding tests for both of these

Frontend:

  • Created design according to the Figma

✔️ Verification

  • Ensured all tests passed, and endpoints still worked
  • Verified design matched Figma
  • Ensured query parameters were accurately being utilized for filter changes for efficient querying
image

🏕️ (Optional) Future Work / Notes

Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!

@dburkhart07 dburkhart07 marked this pull request as ready for review March 22, 2026 22:25
@dburkhart07 dburkhart07 changed the title Fully functional page and backend adjustments [SSF 162] - Admin Donation Stats Mar 22, 2026
@dburkhart07 dburkhart07 requested a review from amywng March 25, 2026 00:23
Copy link
Copy Markdown
Member

@amywng amywng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small things

fontWeight="500"
gap={2}
>
{pantryNameOptions
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are we doing about the case where two pantries have the same name?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good question. We really have no way to differentiate between the 2 aside from the pantry id. This makes me wonder if the best solution is rather filtering by pantryIds instead of pantryNames, yet still displaying the names in the filter. Thoughts?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realized this is an issue with many of our filters, so I think we can hold off on a solution for now until we fix all of them

@dburkhart07 dburkhart07 requested a review from amywng March 31, 2026 20:30
@dburkhart07 dburkhart07 requested a review from sam-schu March 31, 2026 23:59
fetchStats();
}, [selectedPantries, selectedYears, availableYears, currentPage]);

const handlePantryNameFilterChange = (name: string, checked: boolean) => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be kinda nice to have a clear button for the name filter.........

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not against this. none of our other filters have it, so if we go through with it we should put this on every single one. gonna confirm with priya.

@dburkhart07 dburkhart07 requested a review from amywng April 1, 2026 03:45
@dburkhart07 dburkhart07 requested a review from amywng April 2, 2026 00:46
Copy link
Copy Markdown
Collaborator

@sam-schu sam-schu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the delay! lmk if you'd like me to deal with merge conflicts

fontWeight="500"
gap={2}
>
{pantryNameOptions
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realized this is an issue with many of our filters, so I think we can hold off on a solution for now until we fix all of them

@dburkhart07
Copy link
Copy Markdown
Author

spoke with priya, and we decided to remove All Available Data, and just have all the years available, unselected at first, and showing all years for donations. Once years get selected, then filtering occurs.

@dburkhart07 dburkhart07 requested a review from sam-schu April 12, 2026 19:41
Assignments,
PantryStats,
TotalStats,
CreateDonationDto,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imagine this isn't necessary?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why wouldnt it be?

@dburkhart07 dburkhart07 requested a review from sam-schu April 13, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants